from Crawler.settings import ORIGINAL


class OriginalReader:
    def __init__(self):
        self.path = ORIGINAL

    def make_redballs_arrsy(self):
        original = open(self.path)
        olines = original.readlines()
        new_array = []
        for line in olines:
            nline = []
            tarr = line.split(',')
            rballs = []
            for i, item in enumerate(tarr):
                if i == 0 or i == 1 or i == 8:
                    nline.append(item)
                else:
                    rballs.append(item)
                    if i == 7:
                        nline.append(rballs)
            new_array.append(nline)

        return new_array
